<template>
  <div class="app-container">
    <el-row>
      <el-col :span="12" class="card-box">
        <el-card>
          <div slot="header">
            <span><i class="el-icon-pie-chart"></i> 消费统计</span>
          </div>
          <div class="el-table el-table--enable-row-hover el-table--medium">
            <div ref="myChart" style="height: 420px" />
          </div>
        </el-card>
      </el-col>

      <el-col :span="12" class="card-box">
        <el-card>
          <div slot="header">
            <span><i class="el-icon-odometer"></i> 统计</span>
          </div>
          <div class="el-table el-table--enable-row-hover el-table--medium">
            <div ref="myChart" style="height: 420px" />
          </div>
        </el-card>
      </el-col>
    </el-row>
  </div>
</template>

<script>
import * as echarts from "echarts";

export default {
  name: "Report",
  data() {
    return {
      myChart: null,
    };
  },
  created() {
    this.getList();
  },
  methods: {
    /** 查询卖手列表 */
    getList() {
      //    this.commandstats = echarts.init(this.$refs.commandstats, "macarons");
      this.myChart = echarts.init(this.$refs.myChart);
      this.myChart.setOption({
        xAxis: {
          type: "category",
          data: ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"],
        },
        yAxis: {
          type: "value",
        },
        series: [
          {
            data: [
              120,
              {
                value: 200,
                itemStyle: {
                  color: "#a90000",
                },
              },
              150,
              80,
              70,
              110,
              130,
            ],
            type: "bar",
          },
        ],
      });
    },
  },
};
</script>
